package com.example.demo.entity;


import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * 
 * @author leiet
 *
 */
@MappedSuperclass
public abstract class BaseEntity implements Serializable {

  /**
   * 逻辑删除标记（0-未删除；1-已删除；）： 未删除
   */
  public static final Integer DEL_FLAG_NORMAL = 0;
  /**
   * 逻辑删除标记（0-未删除；1-已删除；）： 已删除
   */
  public static final Integer DEL_FLAG_DELETE = 1;

  private static final long serialVersionUID = -5420965760116749708L;

  /**
   * 创建人
   */
  @Column(name = "create_by", updatable = false)
  private Long createBy;

  /**
   * 创建时间
   */

  @Temporal(TemporalType.TIMESTAMP)
  @Column(name = "create_date", updatable = false)
  private Date createDate;

  /**
   * 修改人
   */
  @Column(name = "update_by", insertable = false)
  private Long updateBy;

  /**
   * 修改时间
   */
  @Temporal(TemporalType.TIMESTAMP)
  @Column(name = "update_date", insertable = false)
  private Date updateDate;

  /**
   * 逻辑删除标记（0-未删除；1-已删除；）
   */
  @Column(name = "is_deleted")
  private Integer isDeleted;

  public Long getCreateBy() {
    return createBy;
  }

  public void setCreateBy(Long createBy) {
    this.createBy = createBy;
  }

  public Date getCreateDate() {
    return createDate;
  }

  public void setCreateDate(Date createDate) {
    this.createDate = createDate;
  }

  public Long getUpdateBy() {
    return updateBy;
  }

  public void setUpdateBy(Long updateBy) {
    this.updateBy = updateBy;
  }

  public Date getUpdateDate() {
    return updateDate;
  }

  public void setUpdateDate(Date updateDate) {
    this.updateDate = updateDate;
  }

  public Integer getIsDeleted() {
    return isDeleted;
  }

  public void setIsDeleted(Integer isDeleted) {
    this.isDeleted = isDeleted;
  }

}
